Gate Metro connectivity on RCT_DEV_MENU instead of RCT_DEV#57080
Closed
fmacinator wants to merge 1 commit into
Closed
Gate Metro connectivity on RCT_DEV_MENU instead of RCT_DEV#57080fmacinator wants to merge 1 commit into
fmacinator wants to merge 1 commit into
Conversation
Summary: When an iOS app is built with the React Native dev menu enabled (`RCT_DEV_MENU=1`) but `RCT_DEV=0`, the "Change Bundle Location" option can be visible while the Metro connection path remains compiled out. This makes the setting ineffective. This gates the Metro host override path on `RCT_DEV_MENU` instead of `RCT_DEV`, matching the flag that controls whether the dev menu exists. Auto-discovery via `guessPackagerHost` remains behind `RCT_DEV` because it is a development convenience for full dev builds. Builds that do not set `RCT_DEV_MENU=1` keep the same preprocessor output because `RCT_DEV_MENU` defaults to `RCT_DEV`. Changelog: [iOS][Fixed] - Allow iOS apps with the dev menu enabled (`RCT_DEV_MENU`) to connect to Metro via "Change Bundle Location" Differential Revision: D107524388
|
@fmacinator has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107524388. |
Collaborator
|
This pull request was successfully merged by @fmacinator in 94380cb When will my fix make it into a release? | How to file a pick request? |
|
This pull request has been merged in 94380cb. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
When an iOS app is built with the React Native dev menu enabled (
RCT_DEV_MENU=1) butRCT_DEV=0, the "Change Bundle Location" option can be visible while the Metro connection path remains compiled out. This makes the setting ineffective.This gates the Metro host override path on
RCT_DEV_MENUinstead ofRCT_DEV, matching the flag that controls whether the dev menu exists. Auto-discovery viaguessPackagerHostremains behindRCT_DEVbecause it is a development convenience for full dev builds. Builds that do not setRCT_DEV_MENU=1keep the same preprocessor output becauseRCT_DEV_MENUdefaults toRCT_DEV.Changelog:
[iOS][Fixed] - Allow iOS apps with the dev menu enabled (
RCT_DEV_MENU) to connect to Metro via "Change Bundle Location"Differential Revision: D107524388